Fix problem where notebook gap was double shifted by allocation.x/y
authorOwen Taylor <otaylor@redhat.com>
Tue, 20 Nov 2001 17:42:56 +0000 (17:42 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Tue, 20 Nov 2001 17:42:56 +0000 (17:42 +0000)
Tue Nov 20 12:37:10 2001  Owen Taylor  <otaylor@redhat.com>

* gtk/gtknotebook.c (gtk_notebook_paint): Fix problem
where notebook gap was double shifted by allocation.x/y

* gtk/gtknotebook.c (gtk_notebook_unmap): Chain up
to unmap children.

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtknotebook.c

index b32410d4c2ef1acab8def23337f302eb7dfe7530..6d543ac54ec421f31525d9d27ebc39a94b569a3b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Tue Nov 20 12:37:10 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtknotebook.c (gtk_notebook_paint): Fix problem
+       where notebook gap was double shifted by allocation.x/y
+
+       * gtk/gtknotebook.c (gtk_notebook_unmap): Chain up
+       to unmap children.
+
 Tue Nov 20 14:49:59 2001  Tim Janik  <timj@gtk.org>
 
        * gtk/gtkvpaned.c (gtk_vpaned_size_allocate): fix
index b32410d4c2ef1acab8def23337f302eb7dfe7530..6d543ac54ec421f31525d9d27ebc39a94b569a3b 100644 (file)
@@ -1,3 +1,11 @@
+Tue Nov 20 12:37:10 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtknotebook.c (gtk_notebook_paint): Fix problem
+       where notebook gap was double shifted by allocation.x/y
+
+       * gtk/gtknotebook.c (gtk_notebook_unmap): Chain up
+       to unmap children.
+
 Tue Nov 20 14:49:59 2001  Tim Janik  <timj@gtk.org>
 
        * gtk/gtkvpaned.c (gtk_vpaned_size_allocate): fix
index b32410d4c2ef1acab8def23337f302eb7dfe7530..6d543ac54ec421f31525d9d27ebc39a94b569a3b 100644 (file)
@@ -1,3 +1,11 @@
+Tue Nov 20 12:37:10 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtknotebook.c (gtk_notebook_paint): Fix problem
+       where notebook gap was double shifted by allocation.x/y
+
+       * gtk/gtknotebook.c (gtk_notebook_unmap): Chain up
+       to unmap children.
+
 Tue Nov 20 14:49:59 2001  Tim Janik  <timj@gtk.org>
 
        * gtk/gtkvpaned.c (gtk_vpaned_size_allocate): fix
index b32410d4c2ef1acab8def23337f302eb7dfe7530..6d543ac54ec421f31525d9d27ebc39a94b569a3b 100644 (file)
@@ -1,3 +1,11 @@
+Tue Nov 20 12:37:10 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtknotebook.c (gtk_notebook_paint): Fix problem
+       where notebook gap was double shifted by allocation.x/y
+
+       * gtk/gtknotebook.c (gtk_notebook_unmap): Chain up
+       to unmap children.
+
 Tue Nov 20 14:49:59 2001  Tim Janik  <timj@gtk.org>
 
        * gtk/gtkvpaned.c (gtk_vpaned_size_allocate): fix
index b32410d4c2ef1acab8def23337f302eb7dfe7530..6d543ac54ec421f31525d9d27ebc39a94b569a3b 100644 (file)
@@ -1,3 +1,11 @@
+Tue Nov 20 12:37:10 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtknotebook.c (gtk_notebook_paint): Fix problem
+       where notebook gap was double shifted by allocation.x/y
+
+       * gtk/gtknotebook.c (gtk_notebook_unmap): Chain up
+       to unmap children.
+
 Tue Nov 20 14:49:59 2001  Tim Janik  <timj@gtk.org>
 
        * gtk/gtkvpaned.c (gtk_vpaned_size_allocate): fix
index b32410d4c2ef1acab8def23337f302eb7dfe7530..6d543ac54ec421f31525d9d27ebc39a94b569a3b 100644 (file)
@@ -1,3 +1,11 @@
+Tue Nov 20 12:37:10 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtknotebook.c (gtk_notebook_paint): Fix problem
+       where notebook gap was double shifted by allocation.x/y
+
+       * gtk/gtknotebook.c (gtk_notebook_unmap): Chain up
+       to unmap children.
+
 Tue Nov 20 14:49:59 2001  Tim Janik  <timj@gtk.org>
 
        * gtk/gtkvpaned.c (gtk_vpaned_size_allocate): fix
index b32410d4c2ef1acab8def23337f302eb7dfe7530..6d543ac54ec421f31525d9d27ebc39a94b569a3b 100644 (file)
@@ -1,3 +1,11 @@
+Tue Nov 20 12:37:10 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtknotebook.c (gtk_notebook_paint): Fix problem
+       where notebook gap was double shifted by allocation.x/y
+
+       * gtk/gtknotebook.c (gtk_notebook_unmap): Chain up
+       to unmap children.
+
 Tue Nov 20 14:49:59 2001  Tim Janik  <timj@gtk.org>
 
        * gtk/gtkvpaned.c (gtk_vpaned_size_allocate): fix
index 498a52856d330f1404d00673b8832fd848acb519..f9f08c211320afb61ef19dd06a9d31f6f7bfc0e2 100644 (file)
@@ -834,6 +834,8 @@ gtk_notebook_unmap (GtkWidget *widget)
   GTK_WIDGET_UNSET_FLAGS (widget, GTK_MAPPED);
 
   gdk_window_hide (GTK_NOTEBOOK (widget)->event_window);
+
+  GTK_WIDGET_CLASS (parent_class)->unmap (widget);
 }
 
 static void
@@ -2443,19 +2445,13 @@ gtk_notebook_paint (GtkWidget    *widget,
       switch (notebook->tab_pos)
        {
        case GTK_POS_TOP:
-         gap_x = (notebook->cur_page->allocation.x - border_width);
-         gap_width = notebook->cur_page->allocation.width;
-         break;
        case GTK_POS_BOTTOM:
-         gap_x = (notebook->cur_page->allocation.x - border_width);
+         gap_x = (notebook->cur_page->allocation.x - widget->allocation.x - border_width);
          gap_width = notebook->cur_page->allocation.width;
          break;
        case GTK_POS_LEFT:
-         gap_x = (notebook->cur_page->allocation.y - border_width);
-         gap_width = notebook->cur_page->allocation.height;
-         break;
        case GTK_POS_RIGHT:
-         gap_x = (notebook->cur_page->allocation.y - border_width);
+         gap_x = (notebook->cur_page->allocation.y - widget->allocation.y - border_width);
          gap_width = notebook->cur_page->allocation.height;
          break;
        }